package com.probox.order.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel(description="订单流程节点")
public class OrderTimeVo  implements Comparable<OrderTimeVo>{

    /**
     * 订单状态(0取消订单/1提交订单/2付款成功/3已发货/4已签收/5已评价)
     */
    @ApiModelProperty(value = "订单状态(0取消订单/1提交订单/2付款成功/3已发货/4已签收/5已评价)")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "时间")
    private Date time;

    @ApiModelProperty(value = "状态名称")
    private String statusName;

    @Override
    public int compareTo(OrderTimeVo o) {
        return this.time.compareTo(o.getTime());
    }
}
